lcTIN_TriGetNext Home

Returns a handle to the triangle that is placed after the specified triangle in a TIN object.

 HANDLE lcTIN_TriGetNext (
   HANDLE hTIN,
   HANDLE hTrian
 );

Parameters
hTIN
  Handle to a TIN object.
hTrian
  Handle to a TIN triangle.

Return Value

  Handle to the triangle that is placed after hTrian in the triangles list.
If there are no triangles after hTrian, the function returns NULL.

See Also

  lcTIN_TriGetFirst


Code sample:
  // get coordinates of all TIN triangles
  HANDLE hTIN, hTrian;
  double X, Y, Z;
  hTIN = lcBlockGetTIN( hBlock, L"Demo TIN" );
  if (hTIN != 0){
    hTrian = lcTIN_TriGetFirst( hTIN );
    while( hTrian != 0 ){
      // first point
      X = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT0X );
      Y = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT0Y );
      Z = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT0Z );
      // second point
      X = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT1X );
      Y = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT1Y );
      Z = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT1Z );
      // third point
      X = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT2X );
      Y = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT2Y );
      Z = lcPropGetFloat( hTrian, LC_PROP_TINTR_PT2Z );
      // get next triangle
      hTrian = lcTIN_TriGetNext( hTIN, hTrian );
    }
  }